import request from "@/utils/request";

// 权限列表
export const listAuth = (query) => {
  return request({
    url: "/backAdmin/appAuthorityApi/list",
    method: "get",
    params: query,
  });
};

// 新增权限
export function authAdd(data) {
  return request({
    url: "/backAdmin/appAuthorityApi/add",
    method: "post",
    data: data,
  });
}

// 查询权限详细
export function getNotice(noticeId) {
  return request({
    url: "/system/notice/" + noticeId,
    method: "get",
  });
}
// 修改权限
export function updateAuth(data) {
  return request({
    url: "/backAdmin/appAuthorityApi/update",
    method: "post",
    data: data,
  });
}
// 删除权限
export function delAuth(appAuthorityIdList) {
  return request({
    url: `/backAdmin/appAuthorityApi/delete?appAuthorityIdList=${appAuthorityIdList}`,
    method: "post",
  });
}

